/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dunify;

import java.util.ArrayList;
import java.util.Collection;
import lunify.LProcessor;
import lunify.Row;

/**
 *
 * @author katie
 */
public class Omega extends LProcessor{
    public Omega(){
        super("omega","Omegawiki database","http://www.omegawiki.org/");
    }
    protected Omega(String name, String title, String url){
        super(name,title,url);
    }

    @Override
    protected Collection<Row> process(String line) {
        Collection<Row> out = new ArrayList<Row>();
        if(line.indexOf("\t")==-1)
            return out;
        //System.out.println(line);
        String[] halves = line.split("\t");
        String[] s_parts = halves[0].split(" ; ");
        String[] t_parts = halves[1].split(" ; ");
        for(String s : s_parts){
            for(String t : t_parts){
                out.add(new Row(s.trim().toLowerCase(), t.trim().toLowerCase()));
            }
        }
        //System.out.println();
        return out;
    }

    
}
